<template>
    <el-table
      :data="rightList"
      style="width: 100%"
      stripe
      border>

      <!-- index 序列 -->
      <el-table-column
        label="#"
        type="index"
        align="center">
      </el-table-column>

      <!-- 权限名 -->
      <el-table-column
        prop="authName"
        label="权限名"
        align="center">
      </el-table-column>

      <!-- 路径 -->
      <el-table-column
        prop="path"
        label="路径"
        align="center">
      </el-table-column>

      <!-- 权限等级 -->
      <el-table-column
        prop="level"
        label="权限等级"
        align="center">
        <template slot-scope="scope">
          <el-tag-common :level="scope.row.level"></el-tag-common>
        </template>
      </el-table-column>

    </el-table>
</template>

<script>
// 组件引入
import ElTagCommon from '@/components/common/ElTagCommon';

export default {
  props: {
    rightList: {
      type: Array,
      default() {
        return [{authName: '请求错误', id: 0, level: '-1', path: 'null', pid: -1}]
      }
    }
  },
  components: {
    ElTagCommon
  }
}
</script>

<style lang="scss" scoped>

</style>